package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2025-02-25
 * Time: 19:16
 */
public class demo2 {
    public static void main(String[] args) {
        Integer a = 100;
        Integer b = 100;
        System.out.println(a.equals(b));

        Integer c = 200;
        Integer d = 200;
        System.out.println(c.equals(d));
    }
    public static void main1(String[] args) {
        Integer a = 100;
        Integer b = 100;
        System.out.println(a == b);

        Integer c = 200;
        Integer d = 200;
//        超过了装箱所能容纳的数字大小，会返回一个新的对象，对象用 == 来比较，比较的是地址，不是数值大小。

        System.out.println(c == d);
    }
}
